﻿using Microsoft.Phone.Tasks;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;

namespace Leuphana.GuidedTour.App
{
    class WebBrowserCommand : ICommand
    {
        public bool CanExecute(object parameter)
        {
             return true;
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            var targetUri = new Uri((string)parameter, UriKind.Absolute);

            var task = new WebBrowserTask()
            {
                Uri = targetUri
            };
            task.Show();
        }
    }
}
